<div class='right-cont wrap-score-list' ng-controller='WithdrawList'>
    <div class='title'>提现列表<i class='fa fa-spin fa-spinner' ng-if='loading'></i></div>
    <div class='content'>
        <ul class='nav nav-tabs nav-tabs-a'>
            <li class='active'>
                <a data-target='#list-all' data-toggle='tab'>全部</a>
            </li>
            <li><a data-target='#list-audit-first' data-toggle='tab'>待初审</a></li>
            <li><a data-target='#list-audit-second' data-toggle='tab'>待复审</a></li>
            <li><a data-target='#list-audit-pass' data-toggle='tab'>已通过</a></li>
            <li><a data-target='#list-audit-fail' data-toggle='tab'>已驳回</a></li>
            <div class='box-search-key-date'>
                <div class='input-group input-group-date'>
                    <input type='text' class='form-control input-date' placeholder='起始时间'
                        ng-model='condition.date_start'>
                    <span class='input-group-addon'>至</span>
                    <input type='text' class='form-control input-date' placeholder='结束时间'
                        ng-model='condition.date_end'>
                </div>
                <input type='text' class='form-control input-keyword' placeholder='ID|昵称|角色'
                    ng-model='condition.keyword'>
                <button class='btn btn-primary' ng-click='get_list(1)'>搜索</button>
                <!-- <button class='btn btn-success' ng-click='out_excel()'>导出</button> -->
            </div>
        </ul>

        <div class='tab-content tab-content-a'>
            <div class='tab-pane fade in active' id='list-all'>
                <table class='table table-list'>
                    <tr>
                        <td>提现ID<span class='fa fa-sort'></span></td>
                        <td>用户ID<span class='fa fa-sort'></span></td>
                        <td>用户昵称<span class='fa fa-sort'></span></td>
                        <td>真实姓名<span class='fa fa-sort'></span></td>
                        <td>申请时间<span class='fa fa-sort'></span></td>
                        <td>申请金额<span class='fa fa-sort'></span></td>
                        <td>状态<span class='fa fa-sort'></span></td>
                        <td>操作<span class='fa fa-sort'></span></td>
                    </tr>
                    <tr ng-repeat='item in list'>
                        <td>{{item.id}}</td>
                        <td>{{item.user_id}}</td>
                        <td>{{item.nickname}}</td>
                        <td>{{item.truename}}</td>
                        <td>{{item.create_date}}</td>
                        <td>{{item.amount}}</td>
                        <td>
                            <span class='label' ng-class='{
                                0 : "label-primary",
                                1 : "label-success",
                                2 : "label-warning",
                                3 : "label-danger"
                            }[item.status]'>{{item.status_text}}</span>
                        </td>
                        <td>
                            <button class='btn btn-xs btn-primary' ng-click='get_item(item)'>详情</button>
                            <button class='btn btn-xs btn-warning' ng-click='get_item(item, ".first-audit-item")' 
                                ng-if='item.status == 2'>
                                初审
                            </button>
                            <button class='btn btn-xs btn-danger' ng-click='get_item(item, ".second-audit-item")' 
                                ng-if='item.status == 3'>
                                复审
                            </button>
                        </td>
                    </tr>
                </table>
            </div>
            <div class='tab-pane fade' id='list-audit-first'>
                <table class='table table-list'>
                    <tr>
                        <td>提现ID<span class='fa fa-sort'></span></td>
                        <td>用户ID<span class='fa fa-sort'></span></td>
                        <td>用户昵称<span class='fa fa-sort'></span></td>
                        <td>真实姓名<span class='fa fa-sort'></span></td>
                        <td>申请时间<span class='fa fa-sort'></span></td>
                        <td>申请金额<span class='fa fa-sort'></span></td>
                        <td>状态<span class='fa fa-sort'></span></td>
                        <td>操作<span class='fa fa-sort'></span></td>
                    </tr>
                    <tr ng-repeat='item in list'>
                        <td>{{item.id}}</td>
                        <td>{{item.user_id}}</td>
                        <td>{{item.nickname}}</td>
                        <td>{{item.truename}}</td>
                        <td>{{item.create_date}}</td>
                        <td>{{item.amount}}</td>
                        <td>
                            <span class='label' ng-class='{
                                0 : "label-primary",
                                1 : "label-success",
                                2 : "label-warning",
                                3 : "label-danger"
                            }[item.status]'>{{item.status_text}}</span>
                        </td>
                        <td>
                            <button class='btn btn-xs btn-primary' ng-click='get_item(item)'>详情</button>
                            <button class='btn btn-xs btn-warning' ng-click='get_item(item, ".first-audit-item")' 
                                ng-if='item.status == 2'>
                                初审
                            </button>
                            <button class='btn btn-xs btn-danger' ng-click='get_item(item, ".second-audit-item")' 
                                ng-if='item.status == 3'>
                                复审
                            </button>
                        </td>
                    </tr>
                </table>
            </div>
            <div class='tab-pane fade' id='list-audit-second'>
                <table class='table table-list'>
                    <tr>
                        <td>提现ID<span class='fa fa-sort'></span></td>
                        <td>用户ID<span class='fa fa-sort'></span></td>
                        <td>用户昵称<span class='fa fa-sort'></span></td>
                        <td>真实姓名<span class='fa fa-sort'></span></td>
                        <td>申请时间<span class='fa fa-sort'></span></td>
                        <td>申请金额<span class='fa fa-sort'></span></td>
                        <td>状态<span class='fa fa-sort'></span></td>
                        <td>操作<span class='fa fa-sort'></span></td>
                    </tr>
                    <tr ng-repeat='item in list'>
                        <td>{{item.id}}</td>
                        <td>{{item.user_id}}</td>
                        <td>{{item.nickname}}</td>
                        <td>{{item.truename}}</td>
                        <td>{{item.create_date}}</td>
                        <td>{{item.amount}}</td>
                        <td>
                            <span class='label' ng-class='{
                                0 : "label-primary",
                                1 : "label-success",
                                2 : "label-warning",
                                3 : "label-danger"
                            }[item.status]'>{{item.status_text}}</span>
                        </td>
                        <td>
                            <button class='btn btn-xs btn-primary' ng-click='get_item(item)'>详情</button>
                            <button class='btn btn-xs btn-warning' ng-click='get_item(item, ".first-audit-item")' 
                                ng-if='item.status == 2'>
                                初审
                            </button>
                            <button class='btn btn-xs btn-danger' ng-click='get_item(item, ".second-audit-item")' 
                                ng-if='item.status == 3'>
                                复审
                            </button>
                        </td>
                    </tr>
                </table>
            </div>
            <div class='tab-pane fade' id='list-audit-pass'>
                <table class='table table-list'>
                    <tr>
                        <td>提现ID<span class='fa fa-sort'></span></td>
                        <td>用户ID<span class='fa fa-sort'></span></td>
                        <td>用户昵称<span class='fa fa-sort'></span></td>
                        <td>真实姓名<span class='fa fa-sort'></span></td>
                        <td>申请时间<span class='fa fa-sort'></span></td>
                        <td>申请金额<span class='fa fa-sort'></span></td>
                        <td>状态<span class='fa fa-sort'></span></td>
                        <td>操作<span class='fa fa-sort'></span></td>
                    </tr>
                    <tr ng-repeat='item in list'>
                        <td>{{item.id}}</td>
                        <td>{{item.user_id}}</td>
                        <td>{{item.nickname}}</td>
                        <td>{{item.truename}}</td>
                        <td>{{item.create_date}}</td>
                        <td>{{item.amount}}</td>
                        <td>
                            <span class='label' ng-class='{
                                0 : "label-primary",
                                1 : "label-success",
                                2 : "label-warning",
                                3 : "label-danger"
                            }[item.status]'>{{item.status_text}}</span>
                        </td>
                        <td>
                            <button class='btn btn-xs btn-primary' ng-click='get_item(item)'>详情</button>
                            <button class='btn btn-xs btn-warning' ng-click='get_item(item, ".first-audit-item")' 
                                ng-if='item.status == 2'>
                                初审
                            </button>
                            <button class='btn btn-xs btn-danger' ng-click='get_item(item, ".second-audit-item")' 
                                ng-if='item.status == 3'>
                                复审
                            </button>
                        </td>
                    </tr>
                </table>
            </div>

            <div class='tab-pane fade' id='list-audit-fail'>
                <table class='table table-list'>
                    <tr>
                        <td>提现ID<span class='fa fa-sort'></span></td>
                        <td>用户ID<span class='fa fa-sort'></span></td>
                        <td>用户昵称<span class='fa fa-sort'></span></td>
                        <td>真实姓名<span class='fa fa-sort'></span></td>
                        <td>申请时间<span class='fa fa-sort'></span></td>
                        <td>申请金额<span class='fa fa-sort'></span></td>
                        <td>状态<span class='fa fa-sort'></span></td>
                        <td>操作<span class='fa fa-sort'></span></td>
                    </tr>
                    <tr ng-repeat='item in list'>
                        <td>{{item.id}}</td>
                        <td>{{item.user_id}}</td>
                        <td>{{item.nickname}}</td>
                        <td>{{item.truename}}</td>
                        <td>{{item.create_date}}</td>
                        <td>{{item.amount}}</td>
                        <td>
                            <span class='label' ng-class='{
                                0 : "label-primary",
                                1 : "label-success",
                                2 : "label-warning",
                                3 : "label-danger"
                            }[item.status]'>{{item.status_text}}</span>
                        </td>
                        <td>
                            <button class='btn btn-xs btn-primary' ng-click='get_item(item)'>详情</button>
                            <button class='btn btn-xs btn-warning' ng-click='get_item(item, ".first-audit-item")' 
                                ng-if='item.status == 2'>
                                初审
                            </button>
                            <button class='btn btn-xs btn-danger' ng-click='get_item(item, ".second-audit-item")' 
                                ng-if='item.status == 3'>
                                复审
                            </button>
                        </td>
                    </tr>
                </table>
            </div>
        </div>
        <div class='box-page' ng-bind-html='pageHtml'></div>
    </div>

    <div class='modal fade get-item'>
        <div class='modal-dialog'>
            <div class='modal-content'> 
                <div class='modal-header'>
                    提现详情
                    <a class='close' data-dismiss='modal'>&times;</a>
                </div>
                <div class='modal-body'>
                    <table class='table-info'>
                        <tr>
                            <td>微信昵称:</td>
                            <td>{{nItem.nickname || '未知'}}</td>
                            <td>真实姓名:</td>
                            <td>{{nItem.truename || '未知'}}</td>
                        </tr>
                        <tr>
                            <td>提现金额:</td>
                            <td>{{nItem.amount || '未知'}}</td>
                            <td>提现时间:</td>
                            <td>{{nItem.create_date || '未知'}}</td>
                        </tr>
                        <tr>
                            <td>提现状态:</td>
                            <td>{{nItem.status_text || '未知'}}</td>
                            <td>审核时间:</td>
                            <td>{{nItem.auth_date || '未知'}}</td>
                            
                        </tr>
                        <tr>
                            <td>审核备注:</td>
                            <td colspan='3'>{{nItem.remark || '无'}}</td>
                        </tr>
                    </table>
                </div>
            </div>
        </div>
    </div>

    <div class='modal fade first-audit-item'>
        <div class='modal-dialog'>
            <div class='modal-content'>
                <div class='modal-header'>
                    条目初审
                </div>
                <div class='modal-body'>
                    <table class='table-form'>
                        <tr>
                            <td class='td-label'>审核结果:</td>
                            <td>
                                <div class='box-radio'>
                                    <label>通过</label>
                                    <input type='radio' ng-model='nItem.result' value='1'>
                                </div>
                                <div class='box-radio'>
                                    <label>不通过</label>
                                    <input type='radio' ng-model='nItem.result' value='0'>
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td class='td-label'>审核备注:</td>
                            <td><textarea class='form-control input-sm' ng-model='nItem.remark'></textarea></td>
                        </tr>
                    </table>
                </div>
                <div class='modal-footer'>
                    <button class='btn btn-primary btn-sm btn-w-sm' ng-click='first_audit(nItem)'>确认</button>
                    <button class='btn btn-default btn-sm btn-w-sm' data-dismiss='modal'>取消</button>
                </div>
            </div>
        </div>
    </div>
    <div class='modal fade second-audit-item'>
        <div class='modal-dialog'>
            <div class='modal-content'>
                <div class='modal-header'>
                    条目复审
                </div>
                <div class='modal-body'>
                    <table class='table-form'>
                        <tr>
                            <td class='td-label'>审核结果:</td>
                            <td>
                                <div class='box-radio'>
                                    <label>通过</label>
                                    <input type='radio' ng-model='nItem.result' value='1'>
                                </div>
                                <div class='box-radio'>
                                    <label>不通过</label>
                                    <input type='radio' ng-model='nItem.result' value='0'>
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td class='td-label'>审核备注:</td>
                            <td><textarea class='form-control input-sm' ng-model='nItem.remark'></textarea></td>
                        </tr>
                    </table>
                </div>
                <div class='modal-footer'>
                    <button class='btn btn-primary btn-sm btn-w-sm' ng-click='second_audit(nItem)'>确认</button>
                    <button class='btn btn-default btn-sm btn-w-sm' data-dismiss='modal'>取消</button>
                </div>
            </div>
        </div>
    </div>
</div>